The new version 2.8.1 of CDFinder has again an extended AppleScript ability.
It is now possible to access the basic catalog and catalog folder info in a real object structured manner. Here is the new part of the dictionary. In addition, the preferences section contains two new properties that contain the number of catalogs and catalog folders. I know, I should have included a count command, but the implementation of it was much more complicated than I thought and I will add it in a later version.
As you can see, you can change the name, the comment, the label, and the selection of a catalog and also a catalog folder. It is also possible to open or close a catalog folder by changing the is open property.
The actual contents of a catalog will be revealed in a later version!
A new event will reveal a catalog or catalog folder in the main window. That event will of course later be used for other classes, too. Starting with 2.8.1, this now includes Found Items.
ID integer [r/o] -- unique ID of this catalog. Only valid during one run of CDFinder!
name text -- the name of the catalog as the user sees it
volume name text [r/o] -- name of the original volume
file name text [r/o] -- name of the actual catalog file, usually the same a the name of the catalog
comment text -- the comment that the user has entered
label small integer -- the label of the catalog. 0 is none
filenumber integer [r/o] -- number of files in the catalog
foldernumber integer [r/o] -- number of folders in the catalog
size integer [r/o] -- the size of the f in KB
free space integer [r/o] -- the free space on that volume in KB
formatted date [r/o] -- the date and time when the volume was formatted (created)
modified date [r/o] -- the date and time when the volume was last modified
catalog created date [r/o] -- the creation date and time of this catalog
catalog folder ID integer [r/o] -- The ID of the catalog folder that contains this catalog. Is zero if the catalog lies in the top level.
selected boolean -- is the catalog selected in the main window?
load data at startup boolean -- if true, CDFinder tries to load the data of this catalog soon after startup. Use this to speed up your searches, but use it wisely!
Class catalog folder: a folder that contains catalog files
Plural form:
catalog folders
Properties:
name text -- the name of the catalog folder
comment text -- the user comment
ID integer [r/o] -- the ID of this catalog folder. Unique duringe one run of CDFinder.
label small integer -- The label of this catalog folder
created date [r/o] -- The date and time of the creation of this catalog folder.
modified date [r/o] -- The date and time of the last modification of this catalog folder
is open boolean -- Is this catalog folder open?
selected boolean -- is the catalog folder selected in the main window?
Class found item: an item in the Found Items window
Properties:
ID integer [r/o] -- the unique ID of this item. Only valid until a new Find operation is invoked!
name text [r/o] -- the name of this item
folder boolean [r/o] -- if true, the item is a folder, otherwise a file
comment text [r/o] -- the comment of the found item
version text [r/o] -- the version info of the found item
label small integer -- the label of this item
created date [r/o] -- The date and time of the creation of this item
modified date [r/o] -- The date and time of the last modification of this item
size integer [r/o] -- the size of the file in KB, but of course only if it is a file!
file type type class [r/o] -- the four character c of the item, if it is a file
creator type type class [r/o] -- the four character creator code of the item, if it is a file
catalogID integer [r/o] -- the ID of the catalog that contains this item.
selected boolean -- is the item selected in the Found Items window?
full path text [r/o] -- the full path of the found item
find in all catalogs/selected catalogs/catalogs without label/catalogs with label 1/catalogs with label 2/catalogs with label 3/catalogs with label 4/catalogs with label 5/catalogs with label 6/catalogs with label 7/found items -- the selection of catalog files to be searched
first kind theName/theComment/theVersion/theFiletype/theCreator/theSize/theCreation date/theModification date/theLabel -- kind of first value to be found
first comparison fIs/fIsNot/fContains/fContainsNot/fBeginsWith/fEndsWith/fMoreThan/fLessThan/fEarlierThan/fLaterThan -- how to compare the value
first value reference -- find String, or filetype, or creator, or size or whatever
[operator findAND/findOR] -- if two find values: how to combine them
[second kind theName/theComment/theVersion/theFiletype/theCreator/theSize/theCreation date/theModification date/theLabel] -- kind of second value to be found
[second comparison fIs/fIsNot/fContains/fContainsNot/fBeginsWith/fEndsWith/fMoreThan/fLessThan/fEarlierThan/fLaterThan] -- how to compare the second value
[second value reference] -- find String, or filetype, or creator, or size or whatever
[add to found boolean] -- add the new results to the already found items, if any
[start find boolean] -- if true, then start find process immediately. If false, just set the values and activate the Find window.
[Result: integer] -- number of found items, or 0 if start find is false